package cn.tedu.spring.eg3;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestShopController {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext acac = new AnnotationConfigApplicationContext("cn/tedu/spring/eg3");
        ShopController shopController = acac.getBean(ShopController.class);
        System.out.println("4.开发者使用阶段，此时bean已经被创建好了");
        //关闭IoC容器,之前会执行end方法，因为有@PreDestroy注解
        acac.close();
    }
}
